package com.by.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author ServivE
 * @version 0.1
 * @className Order
 * @description
 * @date 2024/11/14 14:35
 * @since jdk17
 */
@Data
@TableName("`Order`")
public class Order {
    @TableId(value = "order_id", type = IdType.AUTO)
    Integer order_id;

    @ApiModelProperty(value = "店铺ID")
    Integer shop_id;
    @ApiModelProperty(value = "用户ID")
    Integer user_id;
    @ApiModelProperty(value = "配送类型：无需快递")
    Integer delivery_type;
    @ApiModelProperty(value = "店铺名称")
    String shop_name;
    @ApiModelProperty(value = "总值")
    Integer total;

    @TableField(value = "`status`")
    @ApiModelProperty(value = "订单状态 1:待付款 2:待发货 3:待收货(已发货) 5:成功 6:失败")
    Integer status;
    @ApiModelProperty(value = "订单商品总数")
    Integer all_count;

    @ApiModelProperty(hidden = true,value = "是否已支付，1.已支付0.未支付")
    Integer is_payed;
    @ApiModelProperty(hidden = true, value = "用户订单地址id")
    Integer order_addr_id;
    @TableField(exist = false)
    OrderAddr orderAddr;

    @TableField(exist = false)
    List<OrderItem> orderItemList;
}
